GUI Help > setMaxTextLength

setMaxTextLength
setMaxTextLength handle gadget, int length

Sets the maximum length of text a user can enter into an edit or richedit gadget. This does not affect the length of text that can be added to the control using setGadgetText.

Parameters:
gadget  Handle to an edit or richedit gadget
length  The length of text which the user can enter.